//
//  MyschemeCollection.m
//  liangyi
//
//  Created by 张水 on 16/12/23.
//  Copyright © 2016年 yswh. All rights reserved.
//

#import "MyschemeCollection.h"

@implementation MyschemeCollection

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupUI];
    }
    return self;
}
-(void)setCollectionModel:(MyschemeCollectionModel *)collectionModel{
    _collectionModel = collectionModel;
    self.imgView.image = [UIImage imageNamed:collectionModel.sourceimg];
}
-(void)setupUI{
    self.backgroundColor = [UIColor whiteColor];
    
    self.imgView = [[UIImageView alloc]init];
    [self.contentView addSubview:self.imgView];
    [self.imgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.bottom.equalTo(self.contentView);
    }];
    self.imgView.contentMode = UIViewContentModeScaleToFill;
    self.imgView.image = [UIImage imageNamed:@"banner"];

}

@end
